package mapper;

import entity.Address;
import entity.Test;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import typehandler.AddressTypeHandler;

import java.util.List;

/**
 * @author: hbliy
 * @date: 2025/2/14 12:22
 */
public interface AddressMapper {

    List<Address> selectAll();


    @Select("SELECT detail address FROM address WHERE id = #{id}")
    @Results({
            @Result(column = "address", property = "address", javaType = Test.class, typeHandler = AddressTypeHandler.class)
    })
    Test selectById(int id);

    Test selectById2(int id);
}
